package tcln.gxtx.client.utils;

import com.extjs.gxt.ui.client.data.ModelData;

/**
 * Interface for a predicate which is used to determine the cell-editor according to the model value.
 * 
 * @author Truong Chau Lien Ngoc (lienngoc@gmail.com)
 */
public interface CellEditorPredicate {

    /**
     * Checks if this predicate matches with given model & property for a cell.
     * 
     * @param model
     * @param property
     * @param rowIndex
     * @param colIndex
     * @return <code>true</code> if given properties match with current predicate.
     */
    boolean evaluate(ModelData model, String property, int rowIndex, int colIndex);
}
